var b = {
    name: 'aa'
  }
  function a(e, ee) {
    console.log(this.name);
    return e + ee
  }
  // a.apply(b, [1, 2])
  
  Function.prototype.mybind = function(context) {
    if (typeof this !== 'function') {
      throw new TypeError('Error')
    }

    let _this =this
    context = context || window
    let args =[...arguments].slice(1)
   return function F(){
    //把this代表的函数执行掉
    _this.apply(context,args)//b,a()
   }
 

  }
  
  let c=a.bind(b, 1, 2)
  c(3,4)